package com.health.healthapplet.service.impl;

import com.health.healthapplet.entity.TravelDeclare;
import com.health.healthapplet.mapper.TravelDeclareMapper;
import com.health.healthapplet.service.TravelDeclareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class TravelDeclareServiceImpl implements TravelDeclareService {
    @Autowired
    TravelDeclareMapper travelDeclareMapper;
    @Override
    public int addTravelPerson(TravelDeclare travelDeclare) {
        travelDeclare.setTravelPersonCreateTime(new Date());
        int count = travelDeclareMapper.addTravelPerson(travelDeclare);
        return count;
    }
    public List <TravelDeclare> queryTravelPersonName(String travelPersonName){
        List <TravelDeclare> personList = travelDeclareMapper.queryTravelPersonName(travelPersonName);
        return  personList;
    }
    public List <TravelDeclare> queryTravelPersonList(){
        List <TravelDeclare> personList = travelDeclareMapper.queryTravelPersonList();
        return  personList;
    }
}
